package com.atguigu.gulimall.order.service;

import com.atguigu.common.to.mq.SeckillOrderTo;
import com.atguigu.gulimall.order.vo.OrderConfirmVo;
import com.atguigu.gulimall.order.vo.OrderSubmitVo;
import com.atguigu.gulimall.order.vo.SubmitOrderResponseVo;
import com.atguigu.gulimall.order.vo.alipay.PayAsyncVo;
import com.atguigu.gulimall.order.vo.alipay.PayVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.order.entity.OrderEntity;

import java.util.Map;

/**
 * 订单
 *
 * @author jungle
 * @email jungle@gmail.com
 * @date 2021-11-22 23:59:57
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);
    /**
     * 订单确认页面返回所需要的数据
     */
    OrderConfirmVo confirmOrder();
    /**
     * 下单操作
     */
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);
    /**
     * 根据订单号获取订单详情
     */
    OrderEntity getOrderByOrderSn(String orderSn);

    /**
     * 定时关单
     * @param entity
     */
    void closeOrder(OrderEntity entity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrder);

}

